package cn.gd.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {

    //@TableId(type = IdType.AUTO )配置id生成策略，当我们策略为自动递增时，我们数据库字段也必须设置为id自增，否则运行会报错
    @TableId(type = IdType.AUTO )
    private Integer id;
    private String username;
    private String password;
    private String gender;
    private Integer age;
    private Date birthday;
    private Integer rid;
    @Version
    private Integer version;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @TableLogic
    private Integer deleted;
}
